package com.iflytek.cosmo.ocr;

import java.io.IOException;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;


/**
 * CosmoOcrApplication Main
 * 
 * @author ruimeng
 */
@MapperScan("com.iflytek.cosmo.ocr.dao")
@SpringBootApplication(scanBasePackages= {"com.iflytek.cosmo","com.iflytek.icourt.file.export","com.iflytek.icourt.service","com.iflytek.icourt.common.util"})
@EnableScheduling
public class CosmoOcrApplication extends SpringBootServletInitializer {
    protected static final String AUTH_PATH = "./view-ocr-server/src/main/resources/data/serverAuth.txt";

	@Autowired
	private ApplicationContext appContext;

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(CosmoOcrApplication.class);
	}

	public static void main(String[] args) throws IOException {
        SpringApplication.run(CosmoOcrApplication.class, args);
	}

}
